package com.nbpt;

import android.os.Bundle;
import android.content.Intent;
import android.os.CountDownTimer;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;

public class huanying extends SmartCity {

    private  TextView tvSkip;

    protected void onCreate(@Nullable Bundle savedInstanceState) {


        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_huanying);
        tvSkip = findViewById(R.id.textView3);

        CountDownTimer timer = new CountDownTimer(3500,1000) {
            @Override
            public void onTick(long l) {
                tvSkip.setText((l/1000)+"秒跳转");
            }

            @Override
            public void onFinish() {
                tvSkip.setText("正在跳转");
                Intent intent = new Intent(huanying.this,SmartCity.class);
                startActivity(intent);
                finish();
            }
        };
        timer.start();
        }

        public void guan(View view)
        {
            Intent intent = new Intent(huanying.this,SmartCity.class);
            startActivity(intent);
            finish();
        }


}
